<?php
return CMap::mergeArray(
	require_once(dirname(__FILE__).'/main.php'), CMap::mergeArray(
		require_once(dirname(__FILE__).'/url.php'), array(
			// стандартный контроллер
			'defaultController' => 'site/index',
			'params'=>array(
				'languages'=>array('ru'=>'Russian','tr'=>'Turkish'),
			),
			'sourceLanguage' => 'ru',
			'language' => 'ru',
			// компоненты
			'components'=>array(
				'file'=>array(
					'class'=>'application.extensions.file.CFile',
				),
				'messages'=>array(
					'forceTranslation'=>true,
					'onMissingTranslation' => array('CustomEventHandler', 'handleMissingTranslation'),
				),
				'request'=>array(
					'enableCookieValidation'=>true,
					'enableCsrfValidation'=>false,
				),
				'urlManager'=>array(
					'class'=>'application.components.UrlManager',
					'urlFormat'=>'path',
					'showScriptName' => false,
					'rules'=>array(
						'ulogin/login'=>'ulogin/login',
						'<language:\w+>/<controller:\w+>/<action:\w+>/'=>'<controller>/<action>',
					),
				),
				// пользователь
				'user'=>array(
					'loginUrl'=>array('/site/login'),
				),

				// mailer
				'mailer'=>array(
					'pathViews' => 'application.views.backend.email',
					'pathLayouts' => 'application.views.email.backend.layouts'
				),
					
			),
		)
	)
);